$OpenBSD: patch-CMakeLists_txt,v 1.16 2015/03/26 07:10:02 dcoppa Exp $
--- CMakeLists.txt.orig	Tue Mar 10 09:38:44 2015
+++ CMakeLists.txt	Wed Mar 18 06:23:59 2015
@@ -249,6 +249,15 @@ macro (CMAKE_BUILD_UTILITIES)
   # (a macro defined in this file)
   CMAKE_HANDLE_SYSTEM_LIBRARIES()
 
+  if($ENV{LOCALBASE})
+    set(OPENBSD_LOCALBASE $ENV{LOCALBASE})
+  else()
+    set(OPENBSD_LOCALBASE "/usr/local")
+  endif()
+
+  # to find expat and curl
+  link_directories("${OPENBSD_LOCALBASE}/lib")
+
   #---------------------------------------------------------------------
   # Build zlib library for Curl, CMake, and CTest.
   set(CMAKE_ZLIB_HEADER "cm_zlib.h")
